

<%@page import="VO.jornada"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="Cons" class="DAO.Consulta"/>
<jsp:useBean id="a" class="VO.jornada"/>
<jsp:setProperty name="a" property="*"/>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
    
         if(Cons.validar("jornada","id_jornada='"+a.getid_jornada()+"'") && a.getid_jornada()!=null){
            Cons.guardarJornada(Integer.parseInt(a.getid_jornada()),a.getnombre_jornada());
            response.sendRedirect("jornada.jsp?msg=success");
         }else{
             response.sendRedirect("jornada.jsp?msg=error");
         }
           
        %>
        
    </body>
</html>
